package com.android.superobstacleavoider;

import javax.microedition.khronos.opengles.GL10;

import android.opengl.GLU;

public class LookAtCamera {
	private Vector3 m_pos;
	private Vector3 m_lookAt;

	public LookAtCamera() {
		m_pos = new Vector3(0, 2, 10);
		m_lookAt = new Vector3(0, 0, 0);
	}

	public Vector3 getPos() {
		return m_pos;
	}

	public void setPos(Vector3 v) {
		m_pos = v;
	}

	public void setPosX(float x) {
		m_pos.X = x;
	}

	public void setPosY(float y) {
		m_pos.Y = y;
	}

	public void setPosZ(float z) {
		m_pos.Z = z;
	}

	public Vector3 getLookAt() {
		return m_lookAt;
	}

	public void setLookAt(Vector3 v) {
		m_lookAt = v;
	}

	public void setLookAtX(float x) {
		m_lookAt.X = x;
	}

	public void setLookAtY(float y) {
		m_lookAt.Y = y;
	}

	public void setLookAtZ(float z) {
		m_lookAt.Z = z;
	}

	public void update(GL10 gl) {
		// positionerar kameran
		GLU.gluLookAt(gl, m_pos.X, m_pos.Y, m_pos.Z, m_lookAt.X, m_lookAt.Y,
				m_lookAt.Z, 0, 1, 0);
	}
}
